// 基础配置
import type { BuildConfig, ScriptConfig } from '../interfaces'
import { SYMBOLS } from '../interfaces'
import { PROJECT_PREFIX } from './base'

const SCRIPT_CONFIG: ScriptConfig = {
  PROJECT_NAME: 'GreenWeb',
  NAME: `${SYMBOLS.NATURE.LEAF} 网页清爽助手`,
  AUTHOR: 'ricsy',
  SCRIPT_ID: '534876-做个绿色网站',
  MAIN_SCRIPT_FILENAME: `${PROJECT_PREFIX}.user.js`,
  META_SCRIPT_FILENAME: `${PROJECT_PREFIX}.meta.js`,
  REPO_BASE_URL: 'https://github.com',
  GREASY_FORK_BASE_URL: 'https://greasyfork.org/zh-CN/scripts',
}

const DERIVED_CONFIG = {
  REPO_URL: `${SCRIPT_CONFIG.REPO_BASE_URL}/${SCRIPT_CONFIG.AUTHOR}/${SCRIPT_CONFIG.PROJECT_NAME}`,
  HOMEPAGE_URL: `${SCRIPT_CONFIG.GREASY_FORK_BASE_URL}/${SCRIPT_CONFIG.SCRIPT_ID}`,
}

// 构建配置
export const BUILD_CONFIG: BuildConfig = {
  ...SCRIPT_CONFIG,
  VERSION: '2.0.0',
  DESCRIPTION: '多功能网页优化工具，提供文章目录、广告清除、复制破解、登录弹窗拦截等网页功能，集成脚本菜单，支持CSDN/百度/知乎/简书/掘金等平台，旨在为用户提供绿色、高效的网站浏览体验。',
  LICENSE: 'MIT',
  CREATE_TIME: '2025-07-06',
  URL: {
    REPO_URL: DERIVED_CONFIG.REPO_URL,
    HOMEPAGE_URL: DERIVED_CONFIG.HOMEPAGE_URL,
    DOWNLOAD_URL: `${DERIVED_CONFIG.REPO_URL}/app/${SCRIPT_CONFIG.MAIN_SCRIPT_FILENAME}`,
    UPDATE_URL: `${DERIVED_CONFIG.REPO_URL}/app/${SCRIPT_CONFIG.META_SCRIPT_FILENAME}`,
    VERSIONS_URL: `${DERIVED_CONFIG.HOMEPAGE_URL}/versions`,
    FEED_BACK_URL: `${DERIVED_CONFIG.HOMEPAGE_URL}/feedback`,
  },
  IMAGE: {
    LOGO_URL: `data:image/svg+xml;utf8,%3Csvg%20xmlns%3D'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg'%20width%3D'256'%20height%3D'256'%20viewBox%3D'0%200%201024%201024'%3E%3Cpath%20d%3D'M877.696%200H146.303C65.475%200%200%2065.54%200%20146.304V877.76c0%2080.764%2065.469%20146.24%20146.31%20146.24h731.398c80.822%200%20146.304-65.476%20146.304-146.24V146.304C1024%2065.54%20958.537%200%20877.696%200z'%20fill%3D'%23F3BB44'%2F%3E%3Cpath%20d%3D'M519.872%20472.08l-73.07-22.05a20.432%2020.372%2090%200%201-13.916-25.726%2020.563%2020.503%2090%200%201%207.983-10.631l93.486-64.226a20.344%2020.285%2090%200%200%208.943-17.02l-1.483-111.126a20.869%2020.808%2090%200%201%2020.852-20.825%2021.657%2021.594%2090%200%201%2012.912%204.069l91.785%2066.5a21.788%2021.725%2090%200%200%2019.412%202.976l108.448-35.7a21.35%2021.288%2090%200%201%2026.785%2012.862%2019.907%2019.849%2090%200%201%200%2013.169L785.236%20369.659a19.994%2019.936%2090%200%200%203.097%2018.857l68.49%2089.12a20.125%2020.067%2090%200%201-4.32%2028.7%2021.657%2021.594%2090%200%201-12.912%204.07l-114.469-1.4a21.438%2021.376%2090%200%200-17.536%208.662l-66.09%2090.782a21.657%2021.594%2090%200%201-29.49%204.9%2020.563%2020.503%2090%200%201-7.983-10.675l-21.201-66.195-267.937%20300.348a77.132%2076.909%2090%200%201-110.018%203.807%2071.401%2071.194%2090%200%201%203.926-106.796l311.08-261.76z%20m-278.014-3.85c-43.492%200-78.828-34.3-78.828-76.564s35.336-76.564%2078.828-76.564c43.58%200%2078.872%2034.3%2078.872%2076.564s-35.335%2076.564-78.872%2076.564z%20m183.176-218.754c-24.865%200-45.063-19.6-45.063-43.75s20.198-43.75%2045.063-43.75c24.866%200%2045.063%2019.6%2045.063%2043.75s-20.197%2043.75-45.063%2043.75zM750.99%20796.36c-43.536%200-78.828-34.3-78.828-76.563s35.292-76.564%2078.828-76.564%2078.872%2034.3%2078.872%2076.564-35.336%2076.563-78.872%2076.563z'%20fill%3D'%23FFFFFF'%2F%3E%3C%2Fsvg%3E`,
    DEFAULT_AVATAR_URL: 'data:image/svg+xml;utf8,%3Csvg%20xmlns%3D\'http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg\'%20width%3D\'36\'%20height%3D\'36\'%20viewBox%3D\'0%200%201024%201024\'%20fill%3D\'none\'%3E%3Cpath%20d%3D\'M263.41%20537.56c-1.41-2.1-1.44-4.21%200-6.31v6.31z\'%20fill%3D\'%23F0CA9C\'%2F%3E%3Cpath%20d%3D\'M262.54%20554.7c0.23-1.82-0.73-3.83%200.87-5.43v5.41c-0.28%200.4-0.57%200.41-0.87%200.02z\'%20fill%3D\'%23F2D2AB\'%2F%3E%3Cpath%20d%3D\'M262.54%20554.7c0.29-0.01%200.58-0.02%200.87-0.02v4.51c-0.28%200-0.56%200.02-0.84%200.05l-0.03-4.54z\'%20fill%3D\'%23F7E2C8\'%2F%3E%3Cpath%20d%3D\'M183.24%20546.52c0-66.58%2028.85-128.19%2075.6-175.89-6.96-77.51%200.99-123.22%2023.88-137.13%2023.87-14.9%2064.66%202.98%20121.36%2053.66%2031.83-8.94%2066.65-13.91%20102.46-13.91%2033.82%200%2066.65%203.97%2097.49%2012.92%2059.69-53.66%20101.47-72.54%20126.34-57.64%2023.88%2014.91%2030.84%2061.61%2022.88%20141.11%2047.75%2047.7%2076.6%20109.31%2076.6%20176.88%200%2087.45-48.74%20164.96-123.35%20214.64%2042.78%2018.88%2080.57%2044.72%20112.41%2075.52%2086.54-81.48%20140.26-196.75%20140.26-324.94%200-247.44-199.95-447.17-447.65-447.17S63.87%20264.3%2063.87%20511.74c0%20128.19%2053.72%20243.46%20140.26%20324.94%2030.84-28.81%2066.65-53.66%20106.44-72.54-77.59-49.69-127.33-129.18-127.33-217.62z%20m0%200\'%20fill%3D\'%23E6EBF4\'%2F%3E%3Cpath%20d%3D\'M829.85%20546.52c0-67.57-28.85-129.18-76.6-176.88%207.96-79.49%200-127.19-22.88-141.11-23.87-14.9-66.65%203.97-126.34%2057.64-30.84-7.95-63.67-12.92-97.49-12.92-35.81%200-69.64%204.97-102.46%2013.91-57.7-50.68-98.48-68.57-121.36-53.66-22.88%2013.91-30.84%2059.62-23.88%20137.13-47.75%2047.7-75.6%20109.31-75.6%20175.89%200%2088.44%2049.74%20167.94%20127.33%20217.62-40.79%2018.88-76.6%2043.72-106.44%2072.54%2051.73%2049.69%20116.39%2086.46%20187.02%20106.33%2027.85-56.64%2070.63-93.41%20120.37-93.41%2049.73%200%2092.51%2036.77%20120.37%2092.42%2071.62-19.87%20135.29-56.64%20187.02-106.33-31.84-29.81-69.63-55.65-112.41-75.52%2074.6-48.7%20123.35-126.2%20123.35-213.65zM307.59%20363.68c-3.98%200.99-6.96%202.98-9.95%204.97-3.98%200-7.96%200-10.94-1.99-19.9-19.87-17.91-94.4%209.95-109.31%2027.85-14.9%2099.48%2029.81%2089.53%2054.65-6.96%209.94-38.79%2037.76-66.65%2050.68-4.98-0.99-9.95%200-11.94%201z%20m101.47%20380.59c-11.94-3.98-22.88-8.95-33.83-13.92%208.95-5.96%2016.91-14.91%2023.88-27.82%202.98-5.96%205.97-11.92%207.96-18.88%201%206.96%201%2014.91%201.99%2021.86v38.76z%20m286.49-387.55c-18.9-15.9-41.78-27.83-65.65-37.76-1.99-1.99-3.98-3.97-4.97-5.96-9.95-24.84%2067.64-73.53%2098.48-57.64%2019.9%209.94%2020.89%2092.42%200.99%20112.29-4.97%201.99-9.95%201.99-16.91%200.99l-11.94-11.92z%20m0%200\'%20fill%3D\'%23537EFF\'%2F%3E%3Cpath%20d%3D\'M720.42%20581.3c-20.89%206.96-27.85-56.64-45.76-54.65-16.91%200.99-23.87%2057.64-33.82%2057.64-19.9%200-39.79-32.79-59.69-42.73-82.57-40.74-23.88%2029.81-49.74%2029.81-22.88%200-149.22-49.69-159.17-29.81-1.99%204.97%200%209.94-9.95%2019.87-9.95%209.94-29.84-49.68-39.79-29.81-8.95%2045.71%204.97%2095.4%201.99%20166.94%2045.76%2037.76%20110.42%2061.61%20182.05%2061.61%2096.49%200%20180.05-42.73%20222.83-106.33-4.97-53.66%2019.9-101.36-8.95-72.54z%20m-298.43%2089.43c-10.94%200-19.89-12.92-19.89-29.81s8.95-29.81%2019.89-29.81c10.94%200%2019.89%2012.92%2019.89%2029.81s-8.95%2029.81-19.89%2029.81z%20m179.06%200c-10.94%200-19.9-12.92-19.9-29.81s8.95-29.81%2019.9-29.81c10.94%200%2019.89%2012.92%2019.89%2029.81s-8.95%2029.81-19.89%2029.81z%20m0%200\'%20fill%3D\'%23FFC2B0\'%2F%3E%3Cpath%20d%3D\'M581.15%20640.92c0%2016.47%208.91%2029.81%2019.9%2029.81%2010.99%200%2019.89-13.34%2019.89-29.81s-8.91-29.81-19.89-29.81c-10.99%200-19.9%2013.35-19.9%2029.81z%20m0%200M402.1%20640.92c0%2010.65%203.79%2020.49%209.95%2025.82%206.16%205.32%2013.74%205.32%2019.89%200%206.16-5.33%209.95-15.17%209.95-25.82%200-16.47-8.91-29.81-19.89-29.81-11%200-19.9%2013.35-19.9%2029.81z%20m0%200\'%20fill%3D\'%232F2F2F\'%2F%3E%3Cpath%20d%3D\'M760.21%20556.45c0%2034.78-10.94%2068.57-30.84%2097.39-5.97-53.66%2019.9-101.36-8.95-72.54-20.89%206.96-27.85-56.64-45.76-54.65-16.91%200.99-23.87%2057.64-33.82%2057.64-19.9%200-39.79-32.79-59.69-42.73-82.57-40.74-23.88%2029.81-49.74%2029.81-22.88%200-149.22-49.69-159.17-29.81-1.99%204.97%200%209.94-9.95%2019.87-9.95%209.94-29.84-49.68-39.79-29.81-8.95%2045.71%204.97%2095.4%201.99%20166.94-44.76-36.77-71.62-86.46-71.62-142.1%200-112.29%20113.41-203.71%20253.67-203.71%20140.27-0.01%20253.67%2091.41%20253.67%20203.7z\'%20fill%3D\'%232F2F2F\'%2F%3E%3Cpath%20d%3D\'M385.18%20311.01c9.95-24.84-61.68-69.56-89.53-54.65-27.86%2014.91-29.85%2089.44-9.95%20109.31%2025.87%2012.91%2089.53-39.76%2099.48-54.66zM706.5%20369.64c6.96%201.99%2013.93%201.99%2018.9-0.99%2019.9-19.87%2018.9-102.35-0.99-112.29-30.84-15.9-108.43%2032.79-98.48%2057.64%206.96%209.94%2037.8%2037.76%2065.66%2050.68%202.98%200.99%206.96%201.99%209.95%202.98%200.98-0.01%202.97%200.98%204.96%201.98z\'%20fill%3D\'%239FBAFF\'%2F%3E%3Cpath%20d%3D\'M705.5%20369.64c-4.97-0.99-9.95-2.98-14.92-4.97%202.98%200.99%206.96%201.99%209.95%202.98%201.99%200%203.98%200.99%204.97%201.99z%20m-73.61%20572.38c-38.8%2010.93-78.59%2016.89-120.37%2016.89s-81.57-5.96-120.37-16.89c27.85-55.65%2070.63-92.42%20120.37-92.42%2049.74%200%2092.51%2036.77%20120.37%2092.42z%20m0%200\'%20fill%3D\'%239FBAFF\'%2F%3E%3C%2Fsvg%3E',
    CREATOR_AVATAR_URL: '',
  },
}
